//
//  Models.m
//  08-HomeWork
//
//  Created by GivenBmli on 16/7/25.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "Models.h"

@implementation Models

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}
- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)creatWithDic:(NSDictionary *)dic {
    return [[Models alloc] initWithDic:dic];
}

+ (NSArray *)groups {
    NSString *path = [[NSBundle mainBundle] pathForResource:@"DLS160710(2)" ofType:@"plist"];
    NSArray *arr = [NSArray arrayWithContentsOfFile:path];
    NSMutableArray *arrDicSource = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        [arrDicSource addObject:[self creatWithDic:dic]];
    }
    return arrDicSource;
}






@end
